package com.sc.friend.ui

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.activity.ComponentActivity
import androidx.databinding.DataBindingUtil
import androidx.core.content.ContextCompat
import com.sc.friend.BaseActivity
import com.sc.friend.R
import com.sc.friend.databinding.ActivityPhotoBinding

class PhotoActivity : BaseActivity() {
    private lateinit var binding: ActivityPhotoBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this, R.layout.activity_photo)
        setClick()
    }

    fun setClick(){
        binding.imageUpload.setOnClickListener {
            binding.imagePhoto.setImageResource(R.mipmap.photo)
            binding.imageUpload.visibility= View.INVISIBLE
            binding.tvUpload.visibility=View.INVISIBLE
            binding.btnContinue.setBackgroundResource(R.drawable.bg_main_btn)
            binding.btnContinue.setTextColor(ContextCompat.getColor(this, R.color.white))
        }

        binding.imageBack.setOnClickListener{
            finish();
        }

        binding.btnContinue.setOnClickListener {
            val intent = Intent(this, NicknameActivity::class.java)
            startActivity(intent)
        }
    }
} 